<template>
    <view class="canDoDetail">
        <Navigation title="能做什么" background="#fff" />
        <image :src="detail.iconPath" class="w-f h-280"></image>
        <view class="w-f ph-20 content">
            <view class="box ph-32 pv-32 b-24">
                <view class="fs-40n fw-600 text-color4">{{ detail.secondBehaviorCategoryName }}</view>
                <view>
                    <view class="f mt-24 ai-c">
                        <view class="fs-28 fw-600 text-color4">{{ detail.firstBehaviorName }}</view>
                        <image src="http://cwht.ricecs.cn/app/index/success.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.firstBehaviorStatus == 0"></image>
                        <image src="http://cwht.ricecs.cn/app/index/error.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.firstBehaviorStatus == 1"></image>
                        <image src="http://cwht.ricecs.cn/app/index/warn.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.firstBehaviorStatus == 2"></image>
                        <view class="fs-24 text-color3">{{ status[detail.firstBehaviorStatus] }}</view>
                    </view>
                    <view class="fs-23 text-color3 mt-12">{{ detail.firstBehaviorRemark }}</view>
                    <view class="f mt-24 ai-c">
                        <view class="fs-28 fw-600 text-color4">{{ detail.secondBehaviorName }}</view>
                        <image src="http://cwht.ricecs.cn/app/index/success.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.secondBehaviorStatus == 0"></image>
                        <image src="http://cwht.ricecs.cn/app/index/error.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.secondBehaviorStatus == 1"></image>
                        <image src="http://cwht.ricecs.cn/app/index/warn.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.secondBehaviorStatus == 2"></image>
                        <view class="fs-24 text-color3">{{ status[detail.secondBehaviorStatus] }}</view>
                    </view>
                    <view class="fs-23 text-color3 mt-12">{{ detail.secondBehaviorRemark }}</view>
                    <view class="f mt-24 ai-c">
                        <view class="fs-28 fw-600 text-color4">{{ detail.thirdBehaviorName }}</view>
                        <image src="http://cwht.ricecs.cn/app/index/success.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.thirdBehaviorStatus == 0"></image>
                        <image src="http://cwht.ricecs.cn/app/index/error.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.thirdBehaviorStatus == 1"></image>
                        <image src="http://cwht.ricecs.cn/app/index/warn.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.thirdBehaviorStatus == 2"></image>
                        <view class="fs-24 text-color3">{{ status[detail.thirdBehaviorStatus] }}</view>
                    </view>
                    <view class="fs-23 text-color3 mt-12">{{ detail.thirdBehaviorRemark }}</view>
                    <view class="f mt-24 ai-c">
                        <view class="fs-28 fw-600 text-color4">{{ detail.fourthBehaviorName }}</view>
                        <image src="http://cwht.ricecs.cn/app/index/success.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.fourthBehaviorStatus == 0"></image>
                        <image src="http://cwht.ricecs.cn/app/index/error.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.fourthBehaviorStatus == 1"></image>
                        <image src="http://cwht.ricecs.cn/app/index/warn.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.fourthBehaviorStatus == 2"></image>
                        <view class="fs-24 text-color3">{{ status[detail.fourthBehaviorStatus] }}</view>
                    </view>
                    <view class="fs-23 text-color3 mt-12">{{ detail.fourthBehaviorRemark }}</view>
                    <view class="f mt-24 ai-c">
                        <view class="fs-28 fw-600 text-color4">{{ detail.fifthBehaviorName }}</view>
                        <image src="http://cwht.ricecs.cn/app/index/success.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.fifthBehaviorStatus == 0"></image>
                        <image src="http://cwht.ricecs.cn/app/index/error.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.fifthBehaviorStatus == 1"></image>
                        <image src="http://cwht.ricecs.cn/app/index/warn.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.fifthBehaviorStatus == 2"></image>
                        <view class="fs-24 text-color3">{{ status[detail.fifthBehaviorStatus] }}</view>
                    </view>
                    <view class="fs-23 text-color3 mt-12">{{ detail.fifthBehaviorRemark }}</view>
                    <view class="f mt-24 ai-c">
                        <view class="fs-28 fw-600 text-color4">{{ detail.sixthBehaviorName }}</view>
                        <image src="http://cwht.ricecs.cn/app/index/success.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.sixthBehaviorStatus == 0"></image>
                        <image src="http://cwht.ricecs.cn/app/index/error.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.sixthBehaviorStatus == 1"></image>
                        <image src="http://cwht.ricecs.cn/app/index/warn.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.sixthBehaviorStatus == 2"></image>
                        <view class="fs-24 text-color3">{{ status[detail.sixthBehaviorStatus] }}</view>
                    </view>
                    <view class="fs-23 text-color3 mt-12">{{ detail.sixthBehaviorRemark }}</view>
                    <view class="f mt-24 ai-c">
                        <view class="fs-28 fw-600 text-color4">{{ detail.seventhBehaviorName }}</view>
                        <image src="http://cwht.ricecs.cn/app/index/success.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.seventhBehaviorStatus == 0"></image>
                        <image src="http://cwht.ricecs.cn/app/index/error.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.seventhBehaviorStatus == 1"></image>
                        <image src="http://cwht.ricecs.cn/app/index/warn.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.seventhBehaviorStatus == 2"></image>
                        <view class="fs-24 text-color3">{{ status[detail.seventhBehaviorStatus] }}</view>
                    </view>
                    <view class="fs-23 text-color3 mt-12">{{ detail.seventhBehaviorRemark }}</view>
                    <view class="f mt-24 ai-c">
                        <view class="fs-28 fw-600 text-color4">{{ detail.eighthBehaviorName }}</view>
                        <image src="http://cwht.ricecs.cn/app/index/success.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.eighthBehaviorStatus == 0"></image>
                        <image src="http://cwht.ricecs.cn/app/index/error.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.eighthBehaviorStatus == 1"></image>
                        <image src="http://cwht.ricecs.cn/app/index/warn.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.eighthBehaviorStatus == 2"></image>
                        <view class="fs-24 text-color3">{{ status[detail.eighthBehaviorStatus] }}</view>
                    </view>
                    <view class="fs-23 text-color3 mt-12">{{ detail.eighthBehaviorRemark }}</view>
                    <view class="f mt-24 ai-c">
                        <view class="fs-28 fw-600 text-color4">{{ detail.ninthBehaviorName }}</view>
                        <image src="http://cwht.ricecs.cn/app/index/success.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.ninthBehaviorStatus == 0"></image>
                        <image src="http://cwht.ricecs.cn/app/index/error.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.ninthBehaviorStatus == 1"></image>
                        <image src="http://cwht.ricecs.cn/app/index/warn.png" class="w-24 h-24 ml-24 mr-12" v-show="detail.ninthBehaviorStatus == 2"></image>
                        <view class="fs-24 text-color3">{{ status[detail.ninthBehaviorStatus] }}</view>
                    </view>
                    <view class="fs-23 text-color3 mt-12">{{ detail.ninthBehaviorRemark }}</view>
                </view>
            </view>
        </view>
        <view class="w-f ph-40 bot h-136 pt-20">
            <view class="f w-f ai-c jc-c btn h-96 b-96" @click='toDocotr'>
                <image src="http://cwht.ricecs.cn/app/index/ask.png" class="w-32 h-32 mr-12"></image>
                <view class="fs-32 fw-600 text-color5">咨询医生</view>
            </view>
        </view>
    </view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { behaviorDetail } from '@/services/api/index/index';
const status = {
    0: '能做！',
    1: '不能做！',
    2: '谨做！',
};
const detail = ref();
onLoad((options: any) => {
    getDetail(options.id);
});
async function getDetail(id: string) {
    const { data } = await behaviorDetail({ id });
    detail.value = data;
}
 function toDocotr() {
    uni.navigateTo({
    	url:'/pages_index/doctor'
    })
}
</script>
<style lang="scss" scoped>
.canDoDetail {
    background: #f5f5f5;
    min-height: 100vh;
    .bot {
        position: fixed;
        left: 0;
        bottom: 0;
        background: #ffffff;
        .btn {
            background: #fabb3d;
        }
    }

    .content {
        position: relative;
        top: -32rpx;
        .box {
            background: #fff;
        }
    }
}
</style>
